﻿using StarryEdge.Core.Parameter;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StarryEdge.Parameter
{
    public class TemporaryParameter : Prism.Mvvm.BindableBase, ITemporaryParameter
    {

        /// <summary>
        /// 软件状态  false 停止  true 运行
        /// </summary>
        private bool _StatusSoftware;

        public bool Status_Software
        {
            get { return _StatusSoftware; }
            set { SetProperty(ref _StatusSoftware, value); }
        }


        /// <summary>
        /// 设备状态
        /// </summary>
        private int _StatusDevice;

        public int Status_Device
        {
            get { return _StatusDevice; }
            set { SetProperty(ref _StatusDevice, value); }
        }
        public Dictionary<string,int> StatusDevices { get; set; }

        private bool _userEdit = false;
        public bool UserEdit { get => _userEdit; set => _userEdit = value; }

        public TemporaryParameter()
        {
            StatusDevices = new Dictionary<string,int>();
        }

        public void UpdateProperty()
        {
            RaisePropertyChanged(nameof(Status_Software));
            RaisePropertyChanged(nameof(Status_Device));
        }

        public bool GetStatusSoftware() => _StatusSoftware;

        public Dictionary<string, int> GetStatusDevices() => StatusDevices;

    }
}
